package service;

import java.util.*;

import beans.*;
import db.*;

public class doctorSchedulingService {
	
	public List<doctorSchedulingBean> browse(){
		doctorSchedulingDAO dao =new doctorSchedulingDAO();
		return dao.getAllRecords();
	}
	
	public boolean adddoctorScheduling(doctorSchedulingBean doctorScheduling)
	{
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.insertRecord(doctorScheduling);
	}
	
	public doctorSchedulingBean getRecord(int doctorSchedulingId)
	{
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getRecord(doctorSchedulingId);
	}
	
	public void deldoctorScheduling(int schid)
	{
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		doctorSchedulingDao.deleteRecord(schid);
	}
	
	public void updatedoctorScheduling(doctorSchedulingBean beforeRecord,doctorSchedulingBean afterRecord)
	{
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		doctorSchedulingDao.updateRecord(beforeRecord,afterRecord);
	}

	public List<doctorSchedulingBean> getdoctorSchedulingbymz(String mz) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbymz(mz);
	}

	public List<doctorSchedulingBean> getdoctorSchedulingbyks(String ks) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbyks(ks);
	}

	public List<doctorSchedulingBean> getdoctorSchedulingbydate(String date) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbydate(date);
	}

	public List<doctorSchedulingBean> getdoctorSchedulingbyksdate(String id, String date) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbyksdate(id,date);
	}

	public List<doctorSchedulingBean> getdoctorSchedulingbymzdate(String mz, String date) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbymzdate(mz,date);
	}
	public List<doctorSchedulingBean> getdoctorSchedulingbydoctor(String docid) {
		doctorSchedulingDAO doctorSchedulingDao=new doctorSchedulingDAO();
		return doctorSchedulingDao.getdoctorSchedulingbydoctor(docid);
	}
}
